Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter improvements in zed #341

Merged
merged 5 commits into from
Mar 14, 2024

Conversation

josephschorr
Copy link
Member

Updates zed to support recently adding relationship filtering improvements in SpiceDB

Requires authzed/spicedb#1739

@josephschorr josephschorr force-pushed the filter-improvements branch 4 times, most recently from 22a9e5e to c5bf6cf Compare February 7, 2024 20:46
Copy link
Member

@jzelinskie jzelinskie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two things on UX totally unrelated to your changes, but we should fix them up while we're here

@@ -86,3 +116,73 @@ func watchCmdFunc(cmd *cobra.Command, _ []string) error {
}
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't comment on the line because it didn't change, but we should take this opportunity to update the printed format to do roughly the same format as relationships read instead of just %v:

8:00PM CREATED document:README reader user:jzelinskie

This kind of style will mirror the SpiceDB logs:

Screenshot 2024-02-08 at 3 22 15 PM

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link to this output?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed, but didn't add colors

@@ -44,8 +64,18 @@ func watchCmdFunc(cmd *cobra.Command, _ []string) error {
return err
}

relFilters := make([]*v1.RelationshipFilter, 0, len(watchRelationshipFilters))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once again can't comment on the line, but the console.Errorf("starting watch stream"... , should be using the real logger and only on debug.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to printf; can't use the real logger because this code is called in WASM

@josephschorr josephschorr marked this pull request as ready for review March 14, 2024 16:47
@josephschorr josephschorr added this pull request to the merge queue Mar 14, 2024
Merged via the queue into authzed:main with commit f99e4ef Mar 14, 2024
11 checks passed
@josephschorr josephschorr deleted the filter-improvements branch March 14, 2024 16:50
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants